﻿@model Nullable<System.DateTime>
@{
string name = ViewData.TemplateInfo.HtmlFieldPrefix;
string id = name.Replace( ".", "_" );
}

<div class="input-append date datepicker" data-date="2012-02-01" data-date-format="yyyy-dd-mm">
    @if ( Model.HasValue ) {
   @Html.TextBox("", String.Format("{0:yyyy-dd-mm}", Model.Value), new { @class="span2" ,id=@id, name=@name })
}
else {
   @Html.TextBox( "" , String.Format( "{0:yyyy-dd-mm}" , DateTime.Now), new { @class="span2" ,id=@id, name=@name })
}
				
				<span class="add-on"><i class="icon-calendar"></i></span>
</div>


